const {FriendMod}=require('../mod/FriendMod.js');

module.exports.FriendInfo =async function(){
  let data =await FriendMod.find();
  return data;
}

module.exports.updateFriend=async function(Info){
  let data =await FriendMod.updateOne({_id:Info.id},{FriendName:Info.FriendName,FriendAddress:Info.FriendAddress});
}

module.exports.addFriend=async function(Info){
  let data =await FriendMod.create(Info);
  console.log(data);
}

module.exports.deleteFriend=async function(Info){
  let data =await FriendMod.remove({_id:Info.id});
}